package com.zr.bili.dao;

import com.zr.bili.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author zhangrui
 * @date 2020-04-11 22:25
 */
@Mapper
public interface UserMapper {
    @Select("select * from user")
    List<User> selectAll();

    @Insert({ "insert into user(id, name, birthday, address) values(#{id}, #{name}, #{birthday}, #{address})" })
    int insertUser(User user);

}